var b1=new Buffer('0123456789');

var b2=new Buffer(5);
b1.copy(b2,0,0,5);
console.log(b2.toString());